/**
 * 21/02/2014
 * 
 * SaleBO
 */
package org.cuatrovientos.erp.business;

import java.util.List;

import org.cuatrovientos.erp.dao.SaleDAOInterface;
import org.cuatrovientos.erp.model.Sale;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Holds all the business logic for Sale related management
 * @author Javier Tejedor
 */
public class SaleBO implements SaleBOInterface {

	@Autowired
	private SaleDAOInterface saleDAO;

	@Override
	public Sale selectById(int id) {
		return saleDAO.selectById(id);
	}

	@Override
	public List<Sale> selectAll() {
		return saleDAO.selectAll();
	}

	@Override
	public List<Sale> search(String description) {
		return saleDAO.search(description);
	}

	@Override
	public void deleteById(int id) {
		saleDAO.deleteById(id);
	}

	@Override
	public void insert(Sale sale) {
		saleDAO.insert(sale);
	}

	@Override
	public void update(Sale sale) {
		saleDAO.update(sale);
	}
	
}
